import { defineStore } from 'pinia'

export const useUserStore = defineStore({
  id: 'user',
  state: () => {
    return {
      token: '',
      userInfo: '', // auth= 1 =>admin
      myComponentID: '1',       // 个人中心刷新保留
      num: 90,
      timeValue: 0
    }
  },
  getters: {
    changNum() {
      return this.num + 1000
    },
  },
  actions: {
    upNum(val) {
      this.num += val
    },
  },
})
